package interfaceandabstract.exercise;

public abstract class Animal {

    String gender;
    String alias;
    int age;
    int speed; //奔跑速度。

    public Animal() {
    }

    public Animal(String gender, String alias, int age, int speed) {
        this.gender = gender;
        this.alias = alias;
        this.age = age;
        this.speed = speed;
    }

    public abstract void bark(); //动物叫方法也是抽象方法。
}
